export function def(data, key, value, enumerable) {
    Object.defineProperty(data, key, {
        value,
        enumerable,
        configurable: true,
        writable: true,
    })
};
/**
 * 获取对象属性值
 * @param {String} str 
 */
export function parsePath(str) {
    var arrs = str.split(".");
    return (obj) => {
        for (let i = 0; i < arrs.length; i++) {
            if (!obj) return;
            obj = obj[arrs[i]]
        }
        return obj;
    }
};